package com.soft.zosagent.common;

import io.netty.util.AttributeKey;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author huisong
 *
 */
public  class Constant {


	/**
	 *  服务器版本号。
	 */
	public static String ZOSAGENT_VERSION="1.0.1";
	/**
	 * 文件结尾符
	 */
	public static String FILE_SEPARATOR = "□□";
	
	/**
	 * 客户端md5校验文件
	 */
	public static String clientMd5 = "clientMd5.record";
	
	/**
	 * 服务器端md5校验文件
	 */
	public static String serverMd5 = "md5.record";
	
	/**
	 * 
	 */
	public static String SuccessCode = "00";
	public static String SuccessMsg = "command run successfully.";
	public static String FAILCode = "FF";

	/**
	 * 获取文件差异
	 */
	public static String TYPE_GET_DIFFERENT="TYPE_GET_DIFFERENT";

	//指用户指定的操作类型,用户可以指定操作命令


	public static String LOGIN_ACTION="LOGIN";



	public static String SENDJOB_ACTION="SENDJOB";
	public static String RECVJOB_ACTION="RECVJOB";
	public static String CANCELJOB_ACTION="CANCELJOB";
	public static String QUERYJOB_ACTION="QUERYJOB";
	public static String JOBSTATUS_EXECUTING="EXECUTING";
	public static String JOBSTATUS_STOPPED="STOPPED";
	public static String JOBSTATUS_WAITINGFORRUN="WAITINGFORRUN";
	public static String JOBSTATUS_NOTFOUND="NOTFOUND";



	public static String WINDOWS_FILE="WINDOWS_FILE";
	public static String UNIX_FILE="UNIX_FILE";
	public static String ZOS_FILE="ZOS_FILE";




	public static String NETTY_IPFILTER_HANDLER = "marEncoder";
	public static String NETTY_marEncoder_HANDLER = "marEncoder";
	public static String NETTY_marDdecoder_HANDLER = "marDecoder";
	public static String NETTY_LengthFieldBasedFrameDecoder_HANDLER = "LengthFieldBasedFrameDecoder";
	public static String NETTY_SSL_HANDLER = "nettySSLHandler";


	public static String ZOSFILEPARTEN1 = "([a-z A-Z]+[a-z A-Z 0-9]*\\.)+[a-z A-Z]+[a-z A-Z 0-9]*";

	public static String ZOSFILEPARTEN2 =  "([a-z A-Z 0-9]+\\.)+[a-z A-Z 0-9]+\\([a-z A-Z @ $ #]+[a-z A-Z 0-9 $ @ #]+\\)";

	/**
	 * 支持的命令
	 */
	public static final List<String> cmdList = new ArrayList<String>() {
		{
			this.add("RECVJOB");
			this.add("SENDJOB");
			this.add("QUERYJOB");
			this.add("CANCELJOB");
		}
	};

	public static final AttributeKey<String> UNIQUE_ID =
			AttributeKey.valueOf("UNIQUEID");

}
